package com.card323.crpg.battle;

import com.card323.crpg.Hero;

public class HeroBattleAI implements Runnable {
	Hero _hero;
	BattleEngine _battle;

	public HeroBattleAI(Hero hero, BattleEngine battle) {
		_battle = battle;
		_hero = hero;
	}

	public void run() {
		while (!_battle._is_end) {
			if (_hero.get_bi().can_attack()) {
				_battle.attack(_hero,_battle.get_enemy_team(_hero).get_hatred_hero());
			}
			try {
				Thread.sleep(3000);
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}

		}
	}
}
